<?php
//dezend by http://www.yunlu99.com/ QQ:270656184
defined('BASEPATH') || exit('No direct script access allowed');
?><link rel="stylesheet" href="/static/css/item.css" id="css_item">
<script type="text/javascript">
$(function(){
	var _w = $(window).width();
	if(_w < 600) {
		$('#css_item').attr('href','/static/css/m_item.css');
	}
});
</script>
<style type="text/css">
.items_class{margin-top:30px;background:#fff;padding:30px;font-size:16px;}
.items_class a{display:inline-block;border:1px solid #ccc;padding:5px 20px;font-size:14px;margin-left:10px;}
.items_class a.on{background:#ee3531;color:#fff;border:1px solid #ee3531;}
</style>
<div class="banner">
	<div class="container">
		<a href="">怎样发起众筹项目？</a>
		<span class="plus">+</span>
		<a href="">快速了解项目规范</a>
		<i class="fa fa-btc"></i>
	</div>
</div>

<div class="item-box">
	<div class="container">
		<div class="items_class">
		<strong>项目类型：</strong><a href="<?php echo site_url('items/index');?>" 
<?php
if ($flag == 0) {
?>class="on"<?php
}

?>>全部</a><a href="<?php echo site_url('items/index');?>?flag=1" 
<?php
if ($flag == 1) {
?>class="on"<?php
}

?>>预热中</a><a href="<?php echo site_url('items/index');?>?flag=2" 
<?php
if ($flag == 2) {
?>class="on"<?php
}

?>>进行中</a><a href="<?php echo site_url('items/index');?>?flag=3" 
<?php
if ($flag == 3) {
?>class="on"<?php
}

?>>已结束</a>
		</div>
	</div>
	<div class="container">
		
<?php
foreach ($list as $k => $v) {
?>		<div 
<?php
	if (($k % 3) == 0) {
?>style="margin-left:0px;"<?php
	}

?> class="item 
<?php
	if ($v['stat'] == 1) {
?>going<?php
	}
	else if ($v['stat'] == 2) {
?>end<?php
	}
	else if ($v['stat'] == 0) {
?>begin<?php
	}

?>">
			<span class="status-tag">
               	 
<?php
	if ($v['stat'] == 1) {
?>进行中<?php
	}
	else if ($v['stat'] == 2) {
?>已结束<?php
	}
	else if ($v['stat'] == 0) {
?>预热中<?php
	}

?>            </span>
			<div class="img">
				<a href="<?php echo site_url('items/info');?>?id=<?php echo $v['id'];?>"><img src="/upload/item/<?php echo $v['logo'];?>"></a>
			</div>
			<div class="txt">
				<div class="tit"><a href="<?php echo site_url('items/info');?>?id=<?php echo $v['id'];?>">【<?php echo $v['coin']['en_name'];?>专场】<?php echo $v['name'];?></a></div>
				<div class="intro"><?php echo $v['intro'];?></div>
				<div class="total"><?php echo $v['coin']['en_name'];?> <?php echo $v['deal'];?></div>
				<div class="bar"><div class="bar-line" style="width:<?php echo $v['percent'];?>%;height:10px;"></div></div>
				<div class="tab">
					<span><strong><?php echo $v['target_amount'];?></strong>目标金额</span>
					<span style="text-align:center;"><strong><?php echo $v['day'];?></strong>剩余天数</span>
					<span><strong><?php echo $v['support'];?></strong>支持者</span>
					<div class="clear"></div>
				</div>
			</div>
		</div>
		<?php
}

?>		
		<div class="clear"></div>
		<div class="page">
		  <?php echo $page;?>		</div>
		
<?php
if (!$list) {
?>		<div class="not-list">
			<i class="fa fa-ban"></i>
			<span><?php echo lang('user_not_list');?></span>
		</div>
		<?php
}

?>	</div>
	
</div>